var n = getApp();

Page({
    data: {
        list: []
    },
    onLoad: function(n) {},
    onReady: function() {},
    onShow: function() {
        this.getData();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getData: function() {
        var t = this, a = n.getNetAddresss("plugin.converge_pay.frontend.controllers.converge-pay-bank-card.get-bank-card-list");
        n._getNetWork({
            url: a,
            success: function(n) {
                var a = n.data;
                1 == a.result ? t.setData({
                    list: a.data
                }) : wx.showToast({
                    title: a.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(n) {
                console.log(n);
            }
        });
    },
    goToAdd: function(t) {
        var a = t.target.dataset.id || t.currentTarget.dataset.id;
        console.log(a, "54545454"), n._isTextEmpty(a) ? wx.navigateTo({
            url: "/packageA/others/HJinfo/bankcardin/bankcardin"
        }) : wx.navigateTo({
            url: "/packageA/others/HJinfo/bankcardin/bankcardin?type=edit&id=" + a
        });
    }
});